package com.sun.showcase.client.domain.basic;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

public class Tenant implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
    /**
     * ID       db_column: id 
     */	
	private Long id;
    /**
     * 租户编码       db_column: tenant_code 
     */	
	private String tenantCode;
    /**
     * 租户名称       db_column: tenant_name 
     */	
	private String tenantName;
	//columns END

	public Tenant(){
	}

	public Tenant(
			Long id
	){
		this.id = id;
	}

	public void setId(Long value) {
		this.id = value;
	}
	
	public Long getId() {
		return this.id;
	}
	public void setTenantCode(String value) {
		this.tenantCode = value;
	}
	
	public String getTenantCode() {
		return this.tenantCode;
	}
	public void setTenantName(String value) {
		this.tenantName = value;
	}
	
	public String getTenantName() {
		return this.tenantName;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Tenant == false) return false;
		if(this == obj) return true;
		Tenant other = (Tenant)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

